Skip to content

feat: enable_metadata_mode for entity extraction (sync spec v0.7.12) - #72

Merged
kdr merged 1 commit into
mainfrom
kdr-extract2
Jul 24, 2026
Merged

feat: enable_metadata_mode for entity extraction (sync spec v0.7.12)#72
kdr merged 1 commit into
mainfrom
kdr-extract2

Conversation

@kdr

@kdr kdr commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Syncs the SDK to spec v0.7.12 (cloudglue/cloudglue-api-spec#106) and bumps the package to 0.7.19.

Adds enable_metadata_mode to extraction configs: entities are extracted from the file's metadata document (filename, file details, user metadata, connector source metadata) instead of the media content — file-level entities only, flat 1 credit per file, works on metadata-only files without ingesting media, mutually exclusive with enable_transcript_mode.

Generated (cloudglue/sdk)

  • NewExtract, ExtractExtractConfig, and both entities-collection extract_config variants gain the flag

Wrapper (cloudglue/client)

  • extract.create() / extract.run() construct NewExtract with explicit kwargs, so the flag needed plumbing — added enable_metadata_mode and enable_transcript_mode (the latter existed in the API but was never exposed by the wrapper; the two are documented together as mutually exclusive)
  • collections.create() passes extract_config as a dict (flows automatically); docstring now documents the new mode

Test plan

  • Package imports clean; create/run signature smoke-tests; NewExtract payload carries the flag
  • Live battery — 6/6 (evidence in ~/Downloads/cloudglue-v0.7.12-sdk-test-results.md): metadata-mode extract via extract.run on a metadata-only grain file completes with entities mirroring its connector source metadata ({"title": "Amy / KDR", "platform": "grain", "participants": [...]}, segment_entities empty); enable_metadata_mode+enable_transcript_mode returns 400; an entities collection with extract_config.enable_metadata_mode extracts the same from a connector URL. Job + collection deleted at cleanup.

Note

Low Risk
Additive API surface and client kwargs with no changes to default extraction behavior; main risk is callers enabling conflicting modes, which the API rejects with 400.

Overview
Syncs the generated SDK to OpenAPI v0.7.12 and bumps the package to 0.7.19, adding enable_metadata_mode on entity extraction so jobs can pull structured entities from a file’s metadata document (filename, file details, user metadata, connector source metadata) instead of media—file-level only, flat 1 credit per file, suitable for metadata-only files without ingesting video.

The high-level extract.create() and extract.run() wrappers now forward enable_metadata_mode and also expose enable_transcript_mode, which existed in the API but was not previously passed through; the two modes are documented as mutually exclusive. collections.create() documents extract_config.enable_metadata_mode; the dict-based extract_config path picks up the new field via the regenerated models.

Reviewed by Cursor Bugbot for commit 53b04a4. Bugbot is set up for automated code reviews on this repo. Configure here.

Regenerated from spec v0.7.12 (cloudglue/cloudglue-api-spec#106) and
bumped to 0.7.19.

Generated (cloudglue/sdk):
- enable_metadata_mode on NewExtract, ExtractExtractConfig, and the
  entities-collection extract_config variants. When enabled, entities are
  extracted from the file's metadata document (filename, file details,
  user metadata, connector source metadata) instead of media content:
  file-level only, flat 1 credit per file, works on metadata-only files,
  mutually exclusive with enable_transcript_mode.

Wrapper (cloudglue/client):
- extract.create() and extract.run() build NewExtract with explicit
  kwargs — plumbed enable_metadata_mode through both, plus
  enable_transcript_mode which had never been exposed (pre-existing gap;
  the two flags are documented together as mutually exclusive)
- collections.create() passes extract_config as a dict (flows
  automatically); docstring documents the new mode

Verified against the live API (6/6): metadata-mode extract job on a
metadata-only grain file completes and yields file-level entities that
mirror the connector source metadata (title/platform/participants);
metadata+transcript mode combo returns 400; an entities collection with
extract_config.enable_metadata_mode extracts the same entities from a
connector URL.
@kdr
kdr requested a review from amyxst July 23, 2026 21:10
@kdr
kdr merged commit 5670bf2 into main Jul 24, 2026
1 check passed
@kdr
kdr deleted the kdr-extract2 branch July 24, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants